i=1
while i<5:
    j=k=1
    while j<5:
        while k<5:
            if i!=j and j!=k and i!=k:
                print(i*100+j*10+k)
            k+=1
        j+=1
    i+=1
